package com.example.dao;

import com.example.entity.transaction;
import java.util.List;
import java.sql.SQLException;

public interface transactionDao extends Dao {
    //存在查询
    boolean existsByName(String name) throws SQLException;

    //插入数据
    boolean insertTransactionData(transaction item) throws SQLException;


    // 按时间范围 + 价格区间获取数据
    List<transaction> getTodayByAll() throws SQLException;
    List<transaction> getYesterdayByAll() throws SQLException;
    List<transaction> getThisWeekByAll() throws SQLException;
    List<transaction> getThisMonthByAll() throws SQLException;

    List<transaction> getTodayBy0To100() throws SQLException;
    List<transaction> getYesterdayBy0To100()throws SQLException;
    List<transaction> getThisWeekBy0To100() throws SQLException;
    List<transaction> getThisMonthBy0To100() throws SQLException;

    List<transaction> getTodayBy100To1000() throws SQLException;
    List<transaction> getYesterdayBy100To1000() throws SQLException;
    List<transaction> getThisWeekBy100To1000() throws SQLException;
    List<transaction> getThisMonthBy100To1000() throws SQLException;

    List<transaction> getTodayByAbove1000() throws SQLException;
    List<transaction> getYesterdayByAbove1000() throws SQLException;
    List<transaction> getThisWeekByAbove1000() throws SQLException;
    List<transaction> getThisMonthByAbove1000() throws SQLException;
}
